package com.pig4cloud.pig.building.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
public class PropertyBuilding extends Model<PropertyBuilding> {
	@TableId(value = "building_id", type = IdType.ASSIGN_ID)
	private Long buildingId;
	private String buildingName;
	private Long floors;
	private Double height;
	private Double area;
	@TableField(exist = false)//不映射数据库字段
	private String unitId;
	@TableField(exist = false)
	private Integer unitNum;
	@JsonFormat(pattern = "yyyy-MM-dd", shape = JsonFormat.Shape.STRING)
	private LocalDate completionTime;
	@TableField(fill = FieldFill.INSERT)
	private LocalDateTime createTime;
	@TableField(fill = FieldFill.UPDATE)
	private LocalDateTime updateTime;
	@TableField(fill = FieldFill.INSERT)
	private String delFlag;
	private String remark;
}
